Master Data Management

Use Comparison Approvals in MDM

The Comparison Approval functionality allows the Review role user to see the current SAP field value as well as the value the field will be changed to as a result of the data entry process. The Review role can then easily compare the current state and the future state of records before any changes take place.

NOTE: Advanced users such as Syniti consultants must set the Use Comparison Approval flag as it requires knowledge of both SQL and SAP. Once set, business end users assigned to the Review role can use the feature in new tasks.

At a high level, the steps in the process are:

  1. Set the Comparison Approval page setting.

  2. Generate the request-related objects automatically, including the mass change page. Refer to Auto-generate Request-related Objects for more information.

  3. Create the business processes, scenarios, and roles used by mass maintenance.

  4. Create the tasks associated with the pages in the Content WebApp for users to enter, review, reject and approve. Refer to Create a Task for Mass Maintenance based on an Integrate BDC Script template and Create a Task for Mass Maintenance based on a Custom Table.

  5. Assign the newly created Application task to an Application role, and the new approval and review tasks to a Review role in the mass maintenance scenario. Refer to Add a Task to a Role for more information.

This topic contains the following sections:

View the Comparison Approval Page

To view the Comparison Approval page:

  1. Click Master Data Management > Requests in the Navigation pane.

  2. Click the Roles icon for a request.

  3. Click the Tasks icon for a Review role.

  4. Click the Compare TASK ID.

Once the category is set to use Comparison Approvals, when a new task is generated, the system creates a stored procedure used to control the Comparison page in the category database. The naming convention for the procedure is web[PageName]CompareIns. To see the before and after data entries, the CompareIns stored procedure must be modified.

Refer to Sample Stored Procedure For Comparison Approval for an example of a modified stored procedure.

The stored procedure is used to insert what is currently in SAP into the Comparison staging table in the category database for the request.

Set the Use Comparison Approval Page Setting

Access the Category page Vertical View and enable a checkbox to allow Mass Maintenance to use comparison approvals.

To set the comparison approval setting:

  1. Select Category in the Navigation pane.

  2. Click the Vertical View icon for the category.

  3. Click the Rules And Actions tab.

  4. Click the Use Comparison Approval Page check box to enable it.

Complete the CompareIns Stored Procedure

The CompareIns stored procedure is registered to the Finish event for the Data Entry role. The procedure will then run when the Data Entry role user clicks the Finish button on the Task page. The Consultant must complete the stored procedure to include the necessary fields for the comparison.

Refer to Sample Stored Procedure For Comparison Approval for more information.

Sample Stored Procedure For Comparison Approval

These sample stored procedures are original and modified code for the CompareIns stored procedure that must be registered to the Template Role Event rule. Refer to Complete the CompareIns Stored Procedure for more information.

A user modifies the original code as needed for each client’s business needs.

As shown in the sample original code of the stored procedure (below), the commented section that starts after the “BEGIN” statement lists the guidelines and the SQL Code that must be added to the modified code between the “BEGIN” and “END” statements.

This code displays below the comment

--Delete logic needed to support partial approval  

in the modified stored procedure sample below.

Original Sample

USE[dspCompose_Data]

GO

/****** Object:  StoredProcedure [dbo].[webAB_BDC_MM02Compare1CompareIns]    Script Date: 8/8/2013 11:15:32 AM ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

ALTER PROCEDURE[dbo].[webAB_BDC_MM02Compare1CompareIns]

@RequestID int

 AS

BEGIN

/* This Procedure is used for populating the Comparison Approval page for a Template.

*

*  This procedure must be modified to correctly populate table ttAB_BDC_MM02Compare1Compare.

*  ttAB_BDC_MM02Compare1Compare should contain one record for each corresponding record

*  in the ttAB_BDC_MM02Compare1 table.

*

*  Records in ttAB_BDC_MM02Compare1Compare should contain the values currently in SAP

*  for the data inserted into ttAB_BDC_MM02Compare1.

*

*  The following are guidelines for modifying this procedure:

*  1) Delete any records from ttAB_BDC_MM02Compare1Compare for the current Request.

*  2) Delete any records from ttAB_BDC_MM02Compare1Compare where ID = an ID retrieved by the

*       select statement.  When requests are automatically created by partial rejection of

*       another request, ID values will be duplicates of IDs inserted for the original request.

*  3) Remove the SELECT statement delivered in this procedure.

*  4) Insert into ttAB_BDC_MM02Compare1Compare by joining ttAB_BDC_MM02Compare1 with

*     all source tables or views originally used to populate ttAB_BDC_MM02Compare1.

*     -- Key fields should be populated from ttAB_BDC_MM02Compare1Compare.

*     -- Data fields should be populated from the original source(s).

*     -- Limit the Select/Insert to the current RequestID.

*/

SELECT''WHERE 1 = 0

END

 

Modified Sample

USE[dspCompose_Data]

GO

/****** Object:  StoredProcedure [dbo].[webAB_BDC_MM02Compare1CompareIns]    Script Date: 8/14/2013 2:18:42 PM ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

ALTER PROCEDURE[dbo].[webAB_BDC_MM02Compare1CompareIns]

@RequestID int

 AS

BEGIN

/* This Procedure is used for populating the Comparison Approval page for a Template.

*

*  This procedure must be modified to correctly populate table ttAB_BDC_MM02Compare1Compare.

*  ttAB_BDC_MM02Compare1Compare should contain one record for each corresponding record

*  in the ttAB_BDC_MM02Compare1 table.

*

*  Records in ttAB_BDC_MM02Compare1Compare should contain the values currently in SAP

*  for the data inserted into ttAB_BDC_MM02Compare1.

*

*  The following are guidelines for modifying this procedure:

* 1) Delete any records from ttAB_BDC_MM02Compare1Compare for the current Request.

*  2) Delete any records from ttAB_BDC_MM02Compare1Compare where ID = an ID retrieved by the

*      select statement.  When requests are automatically created by partial rejection of

*      another request, ID values will be duplicates of IDs inserted for the original request.

* 3) Remove the SELECT statement delivered in this procedure.

* 4) Insert into ttAB_BDC_MM02Compare1Compare by joining ttAB_BDC_MM02Compare1 with

*     all source tables or views originally used to populate ttAB_BDC_MM02Compare1.

*     -- Key fields should be populated from ttAB_BDC_MM02Compare1Compare.

*     -- Data fields should be populated from the original source(s).

*     -- Limit the Select/Insert to the current RequestID.

*/

DELETE FROM ttAB_BDC_MM02Compare1Compare WHERE RequestID = @RequestID

 

--Delete logic needed to support partial approval 
DELETE FROM   ttAB_BDC_MM02Compare1Compare

WHEREIDIN(SELECTIDFROM ttAB_BDC_MM02Compare1 WHERE RequestID = @RequestID)

 

INSERT INTO ttAB_BDC_MM02Compare1Compare

([ID],

[RequestID],

[RMMG1-MATNR],

[MARA-BISMT],

[MARA-EXTWG],

[MARA-LABOR],

[MARA-BEGRU],

[MARA-BRGEW],

[MARA-GEWEI],

[MARA-NTGEW],

[MARA-WRKST])

 

SELECT

dbo.ttAB_BDC_MM02Compare1.ID,

dbo.ttAB_BDC_MM02Compare1.RequestID,

dbo.ttAB_BDC_MM02Compare1.[RMMG1-MATNR],

dgSAP.dbo.MARA.BISMT,

dgSAP.dbo.MARA.EXTWG,

dgSAP.dbo.MARA.LABOR,

dgSAP.dbo.MARA.BEGRU,

dgSAP.dbo.MARA.BRGEW,

dgSAP.dbo.MARA.GEWEI,

dgSAP.dbo.MARA.NTGEW,

dgSAP.dbo.MARA.WRKST

FROM  dbo.ttAB_BDC_MM02Compare1 INNER JOIN dgSAP.dbo.MARA ON dbo.ttAB_BDC_MM02Compare1.[RMMG1-MATNR]=dgSAP.dbo.MARA.MATNR

WHERE dbo.ttAB_BDC_MM02Compare1.RequestID=@RequestID

 

END

Create a Request for Comparison Approval

Create requests based on the template following the standard procedure. Refer to Create a Request for more information.

Continue with Use the Comparison Approval Page.

Use the Comparison Approval Page

The Comparison Approval functionality allows the Review role user to see both the current SAP field value as well as the value the field will be changed to during the review process.

To use the Comparison Approval page:

  1. Click Master Data Management > Requests in the Navigation pane.

  2. Click the Roles icon for a request.

  3. Click the Tasks icon for a Review role.

  4. Click the Compare TASK ID.

  5. Click the REJECT check box to enable it for the record.

  6. Click Edit and correct the data as needed.

  7. Click Save.